HAL1 CRYP –> HAL2 CRYP ¶
This section provides information about the HAL CRYP constants migration.
Error code ¶
|
HAL1 |
HAL2 |
|---|---|
#define HAL_CRYP_ERROR_NONE
|
#define HAL_CRYP_ERROR_NONE
|
#define HAL_CRYP_DMA_ERROR
/* or */
#define HAL_CRYP_ERROR_DMA
|
#define HAL_CRYP_ERROR_DMA
|
#define HAL_CRYP_ERROR_KEY
|
#define HAL_CRYP_ERROR_KEY
|
#define HAL_CRYP_BUSY_ERROR
#define HAL_CRYP_ERROR_BUSY
#define HAL_CRYP_ERROR_TIMEOUT
#define HAL_CRYP_ERROR_NOT_SUPPORTED
#define HAL_CRYP_ERROR_AUTH_TAG_SEQUENCE
#define HAL_CRYP_ERROR_INVALID_CALLBACK
|
|
Algorithm / chaining mode ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_CHAINMODE_AES_ECB
#define CRYP_AES_ECB
#define CRYP_DES_ECB
#define CRYP_TDES_ECB
#define CRYP_CHAINMODE_AES_CBC
#define CRYP_AES_CBC
#define CRYP_DES_CBC
#define CRYP_TDES_CBC
#define CRYP_CHAINMODE_AES_CTR
#define CRYP_AES_CTR
#define CRYP_CHAINMODE_AES_GCM_GMAC
#define CRYP_AES_GCM_GMAC
#define CRYP_AES_GCM
#define CRYP_CHAINMODE_AES_CCM
#define CRYP_AES_CCM
#define CRYP_CHAINMODE_AES_CMAC
|
|
DMA input phase management constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_DMAIN_ENABLE
#define CRYP_DMAOUT_ENABLE
#define CRYP_DMAOUT_DISABLE
#define CRYP_DMAIN_DISABLE
|
|
GCM/GMAC and CCM/CMAC processing phase constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_GCM_INIT_PHASE
#define CRYP_GCMCMAC_HEADER_PHASE
#define CRYP_GCM_PAYLOAD_PHASE
#define CRYP_GCMCMAC_FINAL_PHASE
#define CRYP_INIT_PHASE
#define CRYP_HEADER_PHASE
#define CRYP_PAYLOAD_PHASE
#define CRYP_FINAL_PHASE
|
|
Enable state constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_AES_DISABLE
#define CRYP_AES_ENABLE
|
|
Operating mode constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_ALGOMODE_ENCRYPT
#define CRYP_ALGOMODE_KEYDERIVATION
#define CRYP_ALGOMODE_DECRYPT
#define CRYP_ALGOMODE_KEYDERIVATION_DECRYPT
#define CRYP_ALGOMODE_TAG_GENERATION
|
|
Key and init vector configuration skip mode constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_KEYIVCONFIG_ALWAYS
#define CRYP_KEYIVCONFIG_ONCE
#define CRYP_KEYNOCONFIG
#define CRYP_IVCONFIG_ONCE
|
|
Data width unit constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_DATAWIDTHUNIT_WORD
#define CRYP_DATAWIDTHUNIT_BYTE
|
|
Header width unit constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_HEADERWIDTHUNIT_WORD
#define CRYP_HEADERWIDTHUNIT_BYTE
|
|
Clear flags constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_CLEAR_KEIF
|
|
Key size constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_KEYSIZE_128B
#define CRYP_KEYSIZE_192B
#define CRYP_KEYSIZE_256B
|
#define HAL_CRYP_KEY_SIZE_128BIT
#define HAL_CRYP_KEY_SIZE_192BIT
#define HAL_CRYP_KEY_SIZE_256BIT
|
Flags constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_FLAG_IFEM
#define CRYP_FLAG_IFNF
#define CRYP_FLAG_OFNE
#define CRYP_FLAG_OFFU
#define CRYP_FLAG_OUTRIS
#define CRYP_FLAG_INRIS
#define CRYP_FLAG_BUSY
#define CRYP_FLAG_KEYVALID
|
#define HAL_CRYP_FLAG_IFEM
#define HAL_CRYP_FLAG_IFNF
#define HAL_CRYP_FLAG_OFNE
#define HAL_CRYP_FLAG_OFFU
#define HAL_CRYP_FLAG_OUTRIS
#define HAL_CRYP_FLAG_INRIS
#define HAL_CRYP_FLAG_BUSY
#define HAL_CRYP_FLAG_KEYVALID
|
Interrupts flags constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_IT_INI
#define CRYP_IT_OUTI
|
#define HAL_CRYP_IT_INI
#define HAL_CRYP_IT_OUTI
|
Data type constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define CRYP_DATATYPE_32B
/* or */
#define CRYP_NO_SWAP
|
#define HAL_CRYP_DATA_SWAPPING_NO
|
#define CRYP_DATATYPE_16B
/* or */
#define CRYP_HALFWORD_SWAP
|
#define HAL_CRYP_DATA_SWAPPING_HALFWORD
|
#define CRYP_DATATYPE_8B
/* or */
#define CRYP_BYTE_SWAP
|
#define HAL_CRYP_DATA_SWAPPING_BYTE
|
#define CRYP_DATATYPE_1B
/* or */
#define CRYP_BIT_SWAP
|
#define HAL_CRYP_DATA_SWAPPING_BIT
|